<%@page import="com.nithya.hms.Appointment"%>
<%@page import="java.util.List"%>
<%@page import="com.nithya.hms.Doctor"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Hospital Management System</title>
</head>
<body>
	<%
		Doctor doctor = (Doctor) session.getAttribute("doctor");
	%>
	<table width="100%" border="1">
		<tr>
			<th><a
				href="<%=request.getContextPath()%>/secure/doctor-home.do">Today's
					Appointment</a></th>
			<th><a
				href="<%=request.getContextPath()%>/secure/doctor-schedule.do">My
					Schedule</a></th>
			<th><a href="<%=request.getContextPath()%>/secure/add-doctor.do">Add
					Doctor</a></th>
			<th><%=doctor.getFirstName()%> <%=doctor.getLastName()%></th>
			<th><a href="<%=request.getContextPath()%>/secure/logout.do">Logout</a></th>
		</tr>
		<tr>
			<td colspan="5" height="500px" align="center" valign="middle">
				<table border="1">
					<tr>
						<th>Token</th>
						<th>Name</th>
						<th>Time</th>
					</tr>

					<%
						List<Appointment> list = (List<Appointment>) request
								.getAttribute("list");
						for (Appointment app : list) {
					%>
					<tr>
						<td><%=app.getId()%></td>
						<td><%=app.getPatientName()%></td>
						<td><%=app.getTime()%></td>
					</tr>
					<%
						}
					%>
				</table>
			</td>
		</tr>
	</table>
</body>
</html>